<?php
	/**
	* 
	*/
	class MachineModel extends Model
	{		
		public function getMachines($condition,$start,$size){
			return $this->where($condition)->limit($start,$size)->order('id desc')->select();
		}

		public function addMachine($data){
			return $this->data($data)->add();
		}

		public function delMachine($condition){
			return $this->where($condition)->delete();
		}

		public function getCounts($condition){
			return $this->where($condition)->count();
		}
	}